From 91916c129e7f1a6045fa5766d680f1cca39d1ade Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 8 Jul 2015 11:41:10 -0400 Subject: [PATCH] Fixes #19 Kind of a hack, but seems a lot easier than trying to get an exact calculation of the width --- which-key.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index 252aa2bda75..a908c7c6ca7 100644 --- a/which-key.el +++ b/which-key.el @@ -241,7 +241,9 @@ need to start the closing timer." ;; side defaults to bottom (if (get-buffer-window which-key--buffer) (display-buffer-reuse-window which-key--buffer alist) - (display-buffer-in-major-side-window which-key--buffer side 0 alist)))) + (display-buffer-in-major-side-window which-key--buffer side 0 alist)) + (let ((fit-window-to-buffer-horizontally t)) + (fit-window-to-buffer (get-buffer-window which-key--buffer))))) (defun which-key/show-buffer-frame (act-popup-dim) (let* ((orig-window (selected-window)) -- 2.30.2